package com.gym.controller.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gym.VO.ResultVO;
import com.gym.form.user.RegisterForm;
import com.gym.service.user.RegisterService;

@Controller
@RequestMapping(value = "regist")
public class RegisterController {

	@Autowired
	private RegisterService registerService;

	// 用户注册
	@RequestMapping(value = "/new/user", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
	@ResponseBody
	public ResultVO regist(@RequestBody RegisterForm registerForm) {
		return registerService.register(registerForm);
	}

}
